﻿/*
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI.DataVisualization.Charting;

namespace BOMS.WebUI.Web.UC
{
    public class ChartCus:Chart
    {
        protected override void Render(System.Web.UI.HtmlTextWriter writer)
        {
          //  base.Render(writer);
            this.add = true;
            if (this.ImageLocation.IndexOf("#NOGUIDPARAM", StringComparison.Ordinal) > 0)
            {
                this._addGuidParam = false;
            }
            string currentImageLocation = this.CurrentImageLocation;
            if (this.RenderType == RenderType.ImageTag)
            {
                if (this.GetImageStorageMode() == ImageStorageMode.UseHttpHandler)
                {
                    using (MemoryStream stream = new MemoryStream())
                    {
                        this.SaveImage(stream);
                        currentImageLocation = ChartHttpHandler.GetChartImageUrl(stream, this.ImageType.ToString());
                    }
                    this._addGuidParam = false;
                }
                else
                {
                    this.SaveImage(this.Page.MapPath(currentImageLocation));
                }
                using (CustomImageControl control = this.BuildImageControl(currentImageLocation, this._addGuidParam))
                {
                    control.RenderControl(writer);
                    goto Label_0186;
                }
            }
            if (this.RenderType == RenderType.ImageMap)
            {
                this.chartPicture.PaintOffScreen();
                using (CustomImageControl control2 = this.BuildImageControl(currentImageLocation, this._addGuidParam))
                {
                    control2.RenderControl(writer);
                    goto Label_0186;
                }
            }
            switch (this.chartPicture.ImageType)
            {
                case ChartImageType.Bmp:
                    this.Page.Response.ContentType = "image/bmp";
                    break;

                case ChartImageType.Jpeg:
                    this.Page.Response.ContentType = "image/jpeg";
                    break;

                case ChartImageType.Png:
                    this.Page.Response.ContentType = "image/png";
                    break;
            }
            this.Page.Response.Charset = "";
            MemoryStream imageStream = new MemoryStream();
            this.SaveImage(imageStream);
            this.Page.Response.BinaryWrite(imageStream.GetBuffer());
        Label_0186:
            if (this.HasImageMaps())
            {
                this.chartPicture.WriteChartMapTag(writer, this.ClientID + "ImageMap");
            }
            this._currentChartImageLocation = string.Empty;

        }
    }
}*/